﻿<%@ Page Title="Chi tiết bài viết" Language="C#" AutoEventWireup="true" CodeBehind="ArticleEdit.aspx.cs" Inherits="VIT.Web.Admin.ArticleEdit" %>
<%@ Register Assembly="VIT.Web.Controls" Namespace="VIT.Web.Controls" TagPrefix="VIT" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<%@ Register Assembly="Mark.Web.UI.WebControls.DateTimePicker" Namespace="Mark.Web.UI.WebControls" tagprefix="mark" %>

<asp:Content ID="HeadContent" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="../../Includes/Validation/Validation.css" rel="stylesheet" type="text/css" />
    <script src="../../Includes/Validation/ValidationEngine.js" type="text/javascript"></script>
    <script src="../../Includes/Validation/Validation.js" type="text/javascript"></script>
    <title>Thêm bài viết mới</title>
</asp:Content>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
    <form id="aspnetForm" runat="server">         
        <!-- Content (Right Column) -->
        <div id="content" class="box">
        <asp:Panel ID="pnAlert" runat="server">
            <p class="msg done" id="lblThanhCong" runat="server" visible="false">Dữ liệu đã lưu thành công.</p>
            <p class="msg error" id="lblThatBai" runat="server" visible="false">Không thể lưu dữ liệu.</p>
            <p class="msg error" id="lblHinhKoDung" runat="server" visible="false">Hình không đúng định dạng.</p>
	    </asp:Panel>
         <div id="ButtonInsert" class="toolbar" runat="server" visible="false">
            <VIT:Submit ID="Save" runat="server" Function="Article_Insert" ToolTip="Lưu và quay lại danh sách" CssClass="icon-32-save" BorderStyle="None" onclick="Save_Click" OnClientClick="$('#aspnetForm').validationEngine();"/>
            <VIT:Submit ID="Apply" runat="server" Function="Article_Insert" ToolTip="Lưu lại" CssClass="icon-32-apply" BorderStyle="None" onclick="Apply_Click" OnClientClick="$('#aspnetForm').validationEngine();" />
            <asp:Button runat="server" ToolTip="Hủy bỏ" CssClass="icon-32-cancel" BorderStyle="None" onclick="Cancel_Click"/>
        </div>  
        <div id="ButtonModify" class="toolbar" runat="server" visible="false">
                <VIT:Submit ID="Save2" runat="server" Function="Article_Modify" ToolTip="Lưu và quay lại danh sách" CssClass="icon-32-save" BorderStyle="None" onclick="Save_Click" OnClientClick="$('#aspnetForm').validationEngine();"/>
                <VIT:Submit ID="Apply2" runat="server" Function="Article_Modify" ToolTip="Lưu lại" CssClass="icon-32-apply" BorderStyle="None" onclick="Apply_Click" OnClientClick="$('#aspnetForm').validationEngine();" />
                <asp:Button runat="server" ToolTip="Hủy bỏ" CssClass="icon-32-cancel" BorderStyle="None" onclick="Cancel_Click"/>
            </div> 
        <div class="clr"></div>
        <fieldset>
			<legend>Thông tin cơ bản</legend>
			<table class="nostyle" style="float:left">	
                <tr runat="server" id="trId" visible="false">
					<td>Mã bài viết:</td>
					<td>
                        <asp:Label ID="lblId" runat="server" Font-Bold="true"></asp:Label>
                    </td>
				</tr>			
                <tr>
					<td>Danh mục:</td>
					<td>
                        <select id="category_parentid" name="CategoryId">
                            <%--<option value=""> -- None -- </option>--%>
                            <%=this.genOption%>
                        </select>
                    </td>
				</tr>
				<tr>
					<td>Hình đại diện:</td>
					<td>
                        <asp:FileUpload ID="fupImgAvar" runat="server" Width="385px" />
                    </td>
				</tr>   
                <tr>
					<td>Hình chi tiết:</td>
					<td>
                        <asp:FileUpload ID="fupImgDetail" runat="server" Width="385px" />
                    </td>
				</tr>   
                <tr>
					<td valign="top">Tag:</td>
					<td>
                        <asp:TextBox ID="Tag" runat="server" Width="300px" MaxLength="100"></asp:TextBox>                        
					</td>
				</tr>
                <tr>
					<td valign="top">Type:</td>
					<td>
                        <asp:CheckBoxList id="ArticleType" runat="server"></asp:CheckBoxList>
                        <%--<asp:Repeater id="rptTypes" runat="server">
                            <ItemTemplate>
                                <input type="checkbox" name="ArticleType" value="<%#Eval("Id") %>" <%#Eval("Checked") %> /><%#Eval("Title") %>
                             </ItemTemplate>
                        </asp:Repeater>--%>
					</td>
				</tr>
				<tr>
					<td>Order:</td>
					<td>
						<asp:TextBox ID="Orders" runat="server" CssClass="validate[onlyNumber]"  Width="50px" Text="50" MaxLength="3"></asp:TextBox>                        
					</td>
				</tr>
                <tr>
					<td>Published:</td>
					<td>
						<asp:CheckBox ID="Published" runat="server" Checked="true"/>
                        
					</td>
				</tr>
                <tr>
					<td>Display Date:</td>
					<td>
                        <mark:DateTimePicker ID="DisplayDate" runat="server" ShowClearButton="true"
                            UseImageButtons="true" PickerCssClass="Picker" ShowTimePicker="true" Width="150" Format="dd-MM-yyyy h:mm:ss" 
                            CancelButtonText="Hủy" OKButtonText="Xác nhận" ClearButtonText="Xóa"/> (Bỏ trống để lấy ngày giờ hiện tại)
					</td>
				</tr>	             
            </table>
            <asp:Image ID="img" runat="server" width="180px" height="180px" style="float:left; margin-left:-20px;" Visible="false"/>
            <asp:Image ID="imgDetail" runat="server" width="300px" height="300px" style="float:left; margin-left:10px;" Visible="false"/>
        </fieldset>
        <fieldset>
		    <legend>Thông tin chi tiết</legend>
            <table class="nostyle">
                <tr>
					<td class="va-top">Ngôn ngữ:</td>
					<td>
                        <asp:DropDownList ID="LanguageId" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="LanguageId_SelectedIndexChanged">
                        </asp:DropDownList>
                    </td>
				</tr>
                <tr>
					<td style="width:100px;">Tiêu đề:</td>
					<td><asp:TextBox ID="ArticleTitle" runat="server" Width="300px" CssClass="validate[length[1,300]]" MaxLength="300"></asp:TextBox></td>
				</tr>				
                <tr>
					<td valign="top">Mô tả:</td>
					<td>         
                        <FCKeditorV2:FCKeditor ID="Brief" runat="server" BasePath="../../Includes/fckeditor/" Height="300px" Width="820px">
                        </FCKeditorV2:FCKeditor> <%--ToolbarSet="ForDescription"--%>
                        <%--<asp:TextBox ID="Brief" runat="server" Height="100px" TextMode="MultiLine" 
                            Width="500px" MaxLength="2000"></asp:TextBox>--%>
					</td>
				</tr>
				<tr>
					<td valign="top">Nội dung:</td>
					<td>
                        <FCKeditorV2:FCKeditor ID="Contents" runat="server" BasePath="../../Includes/fckeditor/" 
                            Height="500px" Width="820px"></FCKeditorV2:FCKeditor>
					</td>
				</tr>	
			</table>
		</fieldset>
        <script type="text/javascript">
            $("#aside ul li#ArticleList").addClass("submenu-active");
        </script>
        </div>
    </form>
</asp:Content>
